package com.twu.biblioteca;


import java.io.*;
import java.util.ArrayList;

public class MyFileReader {
    private String filename;

    public MyFileReader(String name)
    {
        filename = name;
    }
    public ArrayList<String> ReadFile()
    {
        File myfile = new File(filename);
        BufferedReader reader = null;
        ArrayList<String> file_content = new ArrayList<String>();
        try{
            reader = new BufferedReader(new FileReader(myfile));
            String tempString = null;
            while ((tempString = reader.readLine()) != null) {
               file_content.add(tempString);
            }
            reader.close();
           }
        catch (IOException e) {
            e.printStackTrace();
        }
        return file_content;
    }
}
